<?php

header("Content-Type: text/html; charset=utf-8");
$mysql_server_name = 'localhost';
$mysql_username = 'root';
$mysql_password = 'root';
$mysql_database = 'em';
$conn = mysql_connect($mysql_server_name, $mysql_username, $mysql_password, $mysql_database);

if ($conn) {
    echo "数据库连接成功" . "<br/>";
    $sql = 'select * from em.tb_dasf_info';
    $result = mysql_query($sql, $conn);

    while ($row = mysql_fetch_array($result)) {
        echo $row["dasf_info_id"] . "-" . $row["dasfname"] . "<br>";
    }
}
?>
